package day0307;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Demo04 {

    public static void main(String[] args) {

        List list = new ArrayList();
        list.add("Aaa");
        list.add("bbb");

        // 迭代器
        Iterator iterator = list.iterator();

        while (iterator.hasNext()) {
            Object next = iterator.next();
            System.out.println(next);
        }

    }
}
